#formatting examples table
import os
from re import search
from sys import argv

class fformat:

  #def __init__(self, path):
    #self.path = path

  def verify_args(self, path):
    new_path = search('/.*/', path)
    if new_path:
      os.chdir(new_path.group(0))

      return new_path.group(0)
    else: return "doesn't match'"


if __name__ == "__main__":
  raw_path = argv
  exl = fformat()
  print exl.verify_args("/home/atomikin/Videos/A.Thousand.Words.2012.TRIPLE.BDRip.XviD.AC3/A.Thousand.Words.2012.TRIPLE.BDRip.XviD.AC3.avi")
  print os.getcwd(), "\n", "command line args are: ", raw_path[0]